import 'package:flutter/material.dart';
import 'package:screen_adapter/screen_adapter.dart';

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  final iw = 100.r;

  @override
  Widget build(BuildContext context) {
    print('final 尺寸---$iw');

    print('获取 尺寸---${200.r}');
    return Scaffold(
      backgroundColor: Colors.brown,
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Container(
            width: iw,
            height: iw,
            color: Colors.amber,
          )
        ],
      ),
    );
  }
}
